#include "Caracter.h"
#include "../funciones.h"

#include <iostream>

namespace Toolkit
{

Caracter::Caracter(const char &unCaracter, const TipoSerializacion &tSerializacion)
{
	this->caracter = unCaracter;
	this->tSerializacion = tSerializacion;
}

Caracter::~Caracter()
{
}

void Caracter::serializar(stringstream& stream) const
{
    serializacionDigito(stream, tSerializacion, this->caracter);
}

void Caracter::hidratar(stringstream& stream)
{
    hidratacionDigito(stream, tSerializacion, caracter);
}

Dato* Caracter::clonar() const
{
	return new Caracter (caracter, tSerializacion);
}

char Caracter::getCaracter() const
{
	return caracter;
}

void Caracter::setCaracter(const char &unCaracter){
	this->caracter = unCaracter;
}

}
